import request from '@/config/axios'

export type LiaisonVO = {
  id: string,
  companyName: string,
  phone: string,
  address: string,
  remark: string
}

export const getLiaisonPage = (params: PageParam): Promise<{
  total: number,
  list: LiaisonVO[]
}> => request.get({
  url: '/business/liaison/page',
  params
})
export const getLiaison = (id: number): Promise<LiaisonVO> => request.get({
  url: `/business/liaison/${id}`
})

export const delLiaisonList = (ids: number[]): Promise<LiaisonVO> => request.get({
  url: `/business/liaison/delete`,
  params: {ids: ids.join(',')}
})
export const createLiaison = (data: LiaisonVO) => request.post({
  url: `/business/liaison/create`,
  data
})
export const updateLiaison = (data: LiaisonVO) => request.post({
  url: `/business/liaison/update`,
  data
})

